Skip to content

Conversation

zhyayun
Copy link

@zhyayun zhyayun commented May 30, 2025

https://issues.apache.org/jira/browse/FLINK-37855
MySqlSchemaUtils#listTables and TableDiscoveryUtils#listTables is called to get the table names of all tables that need to be processed, However, in scenarios involving many databases and tables, this method call will require querying the database many times, resulting in a long processing time.
The optimization idea is to use mysql's metadata information, a connection to get all the library table information.

@lvyanquan
Copy link
Contributor

I think the key point is reusing the connection, instead of changing the query sql.
So passing Connection to listTables() method will be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants